<?php


class Framework_DB_Table_PrivateMsg extends Framework_DB_Table_Common {

	public $tableName = 'PrivateMsg';
	
    public function __construct($db) {
   		
   		// Columns
   		$this->col = array(
	   		// Primary Key
	        'idPrivateMsg' => array(
	            'type'    => 'integer',
	            'require' => true
	        ),
	        
	        // Foreign Key
	        'idMsgCategory' => array(
	            'type'    => 'integer',
	            'require' => true
	        ),
	        
	        // Foreign Key
	        'idSiteUserRec' => array(
	            'type'    => 'integer',
	            'require' => true
	        ),
	        
	        
	        // Foreign Key
	        'idSiteUserSen' => array(
	            'type'    => 'integer',
	            'require' => true
	        ),
	         
	        'readStatus' => array(
	            'type'    => 'boolean' 
	        ),

	        'recieverStatus' => array(
	        	'type'    => 'boolean'
	        ),
	        	
	        'senderStatus' => array(
	        	'type'    => 'boolean'
	        ),
	        
	        'timeSent'	  => array(
	        	'type'    => 'integer',
	        ),
	    
	        'messageTitle'=> array(
	        	'type'    => 'varchar',
	        	'size'    => 255
	        ),
	        	
	        'message' =>	array(
	        	'type'    => 'clob'
			)
	        
	    );
	    
	    $this->auto_inc_col = 'idPrivateMsg';
	    
	    // Indexes
	    $this->idx = array(
	    	'idPrivateMsg' =>  'primary',
	    	'idMsgCategory' =>  'normal',
	    	'idSiteUserRec' =>  'normal',
			'idSiteUserSen' =>  'normal'
	    );
   		
   		parent::__construct($db);
   }
	
	
}

?>